<?php include(TPL_PATH . '/inc_header.php'); ?>
<?php include(TPL_PATH . '/inc_top.php'); ?>

<link rel="stylesheet" href="<?php p(HTTP_URL) ?>/statics/kindeditor/plugins/code/prettify.css" />

<div class="content">
	
	<script type="text/javascript">
		$(document).ready(function() {
			$.get('<?php p(HTTP_URL) ?>/index.php?a=setViewCnt&id=<?php p($arrData['id']) ?>');
		});
	</script>
              
	<h1><?php p($arrData['title']) ?></h1>
              
	<div class="time">
		<span>作者：<?php p($arrData['user_name']) ?></span>
    	<span>时间：<?php p(substr($arrData['created_at'], 0, 10)) ?></span>
    	<?php if (!empty($arrData['source_from'])) { ?>
    	<span>来源：<?php p($arrData['source_from']) ?></span>
    	<?php } ?>
    	<span>浏览：<?php p($arrData['view_cnt'] + 1) ?>次</span>
	</div>
    
    <?php if (!empty($arrData['desc']) || !empty($arrData['tags'])) { ?>
	<div class="review">
		<?php if (!empty($arrData['desc'])) { ?>
		<span>简介：</span>
		<?php p($arrData['desc']); } ?>
		
		<?php if (!empty($arrData['tags'])) { ?>
		<div class="clear"></div>
		<span<?php !empty($arrData['desc']) && p(' style="margin-left:28px;"') ?>>关键词：</span>
		<?php p($arrData['tags']); } ?>
	</div>
    <?php } ?>
    
    <?php if (!empty($arrDataPage['title'])) { ?>
	<h2><?php p($arrDataPage['title']) ?></h2>
    <?php } ?>
    
    <div class="content_new">
		<?php p($arrDataPage['txt']) ?>
    </div>
              
	<div class="clear"></div>
              
    <!--文章分页-->
    <?php p($strPager) ?>
              
    <div class="neighbor">
    	<span class="neig_prv">
    		<strong>上一篇：</strong>
    		<?php if ($arrNei['prv']) { ?>
    		<a href="<?php p(HTTP_URL . '/' . $arrCatAll['_' . $arrNei['prv']['cat_id']]['name_en'] . '-' . $arrNei['prv']['id'] . '.html') ?>"><?php p(Helper::strCut($arrNei['prv']['title'], 81)) ?></a>
    		<?php } else { ?>
    		无
    		<?php } ?>
		</span>
		
		<span class="neig_next">
			<strong>下一篇：</strong>
			<?php if ($arrNei['next']) { ?>
    		<a href="<?php p(HTTP_URL . '/' . $arrCatAll['_' . $arrNei['next']['cat_id']]['name_en'] . '-' . $arrNei['next']['id'] . '.html') ?>"><?php p(Helper::strCut($arrNei['next']['title'], 81)) ?></a>
    		<?php } else { ?>
    		无
    		<?php } ?>
		</span>
    </div>
    
    <div class="neighbor">
        <span>本文地址：</span>
        <a href="<?php p($strSelfUrl) ?>"><?php p($strSelfUrl) ?></a>
    </div>
    
    <div class="share">
    	<span>分享到：</span>
        <!-- Baidu Button BEGIN -->
        <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
        <a class="bds_tsina"></a>
        <a class="bds_qzone"></a>
        <a class="bds_tqq"></a>
        <a class="bds_kaixin001"></a>
        <a class="bds_renren"></a>
        <span class="bds_more">更多</span>
        </div>
        <script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=200946" ></script>
        <script type="text/javascript" id="bdshell_js"></script>
        <script type="text/javascript">
        document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
        </script>
        <!-- Baidu Button END -->
    </div>

    <?php
    $arrHot = Helper::loadModel('content')->getHots(10, 500, '_' . $arrData['cat_id'], $arrData['id']);
    if ($arrHot && count($arrHot) > 0) {
    ?>
	<div class="tuijian">
        <h3>热门推荐</h3>
        <ul>
        	<?php foreach ($arrHot as $arrTemp) { ?>
            <li><em></em><a href="<?php p(HTTP_URL . '/' . $arrCatAll['_' . $arrTemp['cat_id']]['name_en'] . '-' . $arrTemp['id'] . '.html') ?>"><?php p(Helper::strCut($arrTemp['title'], 90)) ?></a></li>
            <?php } ?>
        </ul>
    </div>
    <?php } ?>
    
</div>

<?php include(TPL_PATH . '/inc_bottom.php'); ?>
<?php include(TPL_PATH . '/inc_footer.php'); ?>